package com.ihr360.message.dto;

import com.ihr360.commons.model.entity.StringIdWithTime;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 消息模板
 *
 * @author tom
 * @date 17-12-28
 */
@Entity
@Table(name="tab_message_template")
public class MessageTemplateDto extends StringIdWithTime {

    public static class MessageType {
        public final static int SMS = 1;
        public final static int WEICHAT = 2;
        public final static int PROGRAM = 3;
        public final static int EMAIL = 4;
    }

    public static class Service {
        public final static int ONECLICKCLOUD = 1;
        public final static int PAYROLLCLOUD = 2;
    }

    /**
     * 服务
     */
    @Column(nullable = false)
    private int service;

    /**
     * 业务实体
     * service = ONECLICKCLOUD OneClickTerm simple className
     */
    @Column(length = 200, nullable = false)
    private String dataDto;

    /**
     * 消息类型
     */
    @Column(nullable = false)
    private int messageType;

    /**
     * 消息描述
     */
    @Column(length = 100, nullable = false)
    private String messageDesc;

    /**
     * 语言
     */
    @Column(length = 10, nullable = false)
    private String local;

    /**
     * 消息模板
     */
    @Column(columnDefinition = "MEDIUMTEXT",nullable = false)
    private String template;

    /**
     * 供应商备案的消息模板Id
     * 微信，短信供应商...
     */
    @Column(length = 200)
    private String vendorTemplateId;

    public int getMessageType() {
        return messageType;
    }

    public void setMessageType(int messageType) {
        this.messageType = messageType;
    }

    public String getTemplate() {
        return template;
    }

    public void setTemplate(String template) {
        this.template = template;
    }

    public int getService() {
        return service;
    }

    public void setService(int service) {
        this.service = service;
    }

    public String getDataDto() {
        return dataDto;
    }

    public void setDataDto(String dataDto) {
        this.dataDto = dataDto;
    }

    public String getMessageDesc() {
        return messageDesc;
    }

    public void setMessageDesc(String messageDesc) {
        this.messageDesc = messageDesc;
    }

    public String getLocal() {
        return local;
    }

    public void setLocal(String local) {
        this.local = local;
    }

    public String getVendorTemplateId() {
        return vendorTemplateId;
    }

    public void setVendorTemplateId(String vendorTemplateId) {
        this.vendorTemplateId = vendorTemplateId;
    }
}
